﻿using System.Collections.Generic;
using System.Threading.Tasks;

namespace NovelDownload
{
    /// <summary>
    /// 小说站点接口
    /// </summary>
    public interface INovelSiteBase
    {
        /// <summary>
        /// 搜索
        /// </summary>
        /// <param name="keyword"></param>
        /// <returns></returns>
        Task<List<NovelInfo>> SearchNovel(string keyword);

        /// <summary>
        /// 获取全部章节
        /// </summary>
        /// <param name="novelUrl"></param>
        /// <returns></returns>
        Task<List<ChapterInfo>> GetAllChapterInfo(string novelUrl);

        /// <summary>
        /// 获取某一章节内容
        /// </summary>
        /// <param name="chapterUrl"></param>
        /// <returns></returns>
        Task<string> GetChapterContent(string chapterUrl);

        /// <summary>
        /// 小说下载
        /// </summary>
        /// <param name="savePath"></param>
        /// <param name="downloadUrl"></param>
        /// <param name="fileName"></param>
        /// <returns></returns>
        Task<string> DownloadNovel(string savePath, string downloadUrl, string fileName);
    }
}
